home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: news.sprintlink.net!eskimo!dai
- From: dai@eskimo.com (Davidson Corry)
- Subject: Re: C++ as introductory programming language
- X-Nntp-Posting-Host: eskimo.com
- Message-ID: <Dp9Bo1.MA4@eskimo.com>
- Sender: news@eskimo.com (News User Id)
- Organization: Eskimo North (206) For-Ever
- X-Newsreader: NewsWerthy 1.71 (unregistered)
- References: <4j999p$nbl@sullivan.ucc.hull.ac.uk>
- Date: Tue, 2 Apr 1996 22:55:12 GMT
-
- Warren Viant <W.J.Viant@dcs.hull.ac.uk>
- (in <4j999p$nbl@sullivan.ucc.hull.ac.uk>) asks:
- > I'm currently formulating a case to use C++ as the first
- > programming language for our first year undergraduate degree
- > course in computer science. Do any members of the group have any
- > comments/references, both for and against C++ as the first
- > language.
-
- Since my 'milk' languages were all procedural (machine, FORTRAN II,
- assembly, PL/I and Snobol, in that order), it's hard for me to imagine
- learning object-oriented design as a first paradigm. And I would very
- much like to learn how such students turn out.
-
- I suspect that C++ is +not+ the language best suited to teaching O-O to
- the programming novice. It is simply too large (in terms of features,
- mechanisms and concepts). While it provides tools for writing truly
- object-oriented programs, these tools are among the most advanced and
- abstruse of C++'s features.
-
- And to write a successful program, even using these features, you must
- first master a smaller subset of the language that is, for all intents
- and purposes, C -- which has its own pitfalls, and in which it is
- perilously easy to "accidentally" write NON-object-oriented programs.
-
- While I disagree with those who hold that this fundamentally
- disqualifies C++ as a truly object-oriented language, I +do+ think it
- puts too many obstacles in the way of the average Joe trying to learn
- the entirely alien skill of any sort of programming at all. (I'll
- admit, I would love to be shown otherwise. But I don't expect to be.)
-
- I would liken C++-as-a-first-language to trying to teach a new pilot on
- a multi-engine jet. What you +want+ is a Piper Cub.
-
- The Cub I have in mind is awk. It is "small" enough to be learned in a
- few weeks, mastered in a semester. The novice can begin writing actual,
- working programs in it almost immediately. awk is capable enough that
- these programs can be really useful and practical. And the language has
- some intriguing features, e.g. associative arrays, that even the "big"
- languages lack.
-
- On the practical side, implementations of awk are available for
- virtually every platform you might want, at prices ranging from
- inexpensive to free. (Dunno how things are at Hull, but over here West
- of the Water, our schools always have more ideas than money to pay for
- them...)
-
- Last, awk is small enough that the student will quickly outgrow it.
- He'll begin bumping up against awk's limitations, and realize why
- concepts like strong typing, encapsulation, inheritance, etc. -- and
- tools like debuggers and IDE's -- are needed for serious work.
-
- True, awk is not object-oriented (and I'm not familiar enough with O-O
- languages to know if there's an awk-sized one available). But the
- investment awk requires is small enough that you can discard it and move
- on (to Smalltalk, say -- or to C++) without feeling guilty about it. I
- feel, and I suspect that many of my colleagues would agree, that my not
- inconsiderable skills in C, acquired over many years and with which I
- have grown comfortable, often impede me from moving on to truly elegant
- use of C++.
-
- Just a few thoughts. I hope you find them useful, or at least amusing.
-
- -- Davidson Corry
- dai@eskimo.com
-